#include <iostream>
using namespace std;

const int kMod = 1e9 + 7;

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  int ans = 1;

  for (cin >> n; n; n--) {
    (ans *= 2) %= kMod;
  }
  cout << ans << "\n";
  return 0;
}